Class symantec.itools.awt.util.spinner.NumericSpinner
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class symantec.itools.awt.util.spinner.NumericSpinner

Object
   |
   +----Component
           |
           +----Container
                   |
                   +----Panel
                           |
                           +----Spinner
                                   |
                                   +----symantec.itools.awt.util.spinner.NumericSpinner

public class NumericSpinner
extends Spinner
implements Serializable
Creates a text box, containing a list of numbers, with up and down arrows. Use this component to allow your users to move through a set of fixed values or type a valid value in the box.

At run time only the selected value is displayed in the text box.

Version:
1.1, June 2, 1997
Author:
Symantec
See Also:
Spinner

Constructor Index

 o symantec.itools.awt.util.spinner.NumericSpinner()
Constructs an empty NumericSpinner.

Method Index

 o addNotify()
Tells this component that it has been added to a container.
 o addPropertyChangeListener(PropertyChangeListener)
Adds a listener for all property change events.
 o addVetoableChangeListener(VetoableChangeListener)
Adds a listener for all vetoable property change events.
 o getCurrentText()
Gets the current text from the Spinner.
 o getIncrement()
Gets the increment/decrement value.
 o removePropertyChangeListener(PropertyChangeListener)
Removes a listener for all property change events.
 o removeVetoableChangeListener(VetoableChangeListener)
Removes a listener for all vetoable property change events.
 o setIncrement(int)
Sets the value to increment/decrement the Spinner by.
 o setMax(int)
Sets the maximum value the spinner may have.
 o setMin(int)
Sets the minimum value the spinner may have.
 o validateText()
returns boolean if text in field is a valid entry

Constructors

 o NumericSpinner
public NumericSpinner()
Constructs an empty NumericSpinner.

Methods

 o addNotify
public void addNotify()
Tells this component that it has been added to a container. This is a standard Java AWT method which gets called by the AWT when this component is added to a container. Typically, it is used to create this component's peer. Here it's used to set maximum text width and note the text of the current selection.

Overrides:
addNotify in class Spinner
See Also:
removeNotify
 o addPropertyChangeListener
public synchronized void addPropertyChangeListener(PropertyChangeListener listener)
Adds a listener for all property change events.

Parameters:
listener - the listener to add
Overrides:
addPropertyChangeListener in class Spinner
See Also:
removePropertyChangeListener
 o addVetoableChangeListener
public synchronized void addVetoableChangeListener(VetoableChangeListener listener)
Adds a listener for all vetoable property change events.

Parameters:
listener - the listener to add
Overrides:
addVetoableChangeListener in class Spinner
See Also:
removeVetoableChangeListener
 o getCurrentText
public java.lang.String getCurrentText()
Gets the current text from the Spinner.

Returns:
the text of the currently selected Spinner value
Overrides:
getCurrentText in class Spinner
 o getIncrement
public int getIncrement()
Gets the increment/decrement value.

Returns:
the increment/decrement value
See Also:
setIncrement
 o removePropertyChangeListener
public synchronized void removePropertyChangeListener(PropertyChangeListener listener)
Removes a listener for all property change events.

Parameters:
listener - the listener to remove
Overrides:
removePropertyChangeListener in class Spinner
See Also:
addPropertyChangeListener
 o removeVetoableChangeListener
public synchronized void removeVetoableChangeListener(VetoableChangeListener listener)
Removes a listener for all vetoable property change events.

Parameters:
listener - the listener to remove
Overrides:
removeVetoableChangeListener in class Spinner
See Also:
addVetoableChangeListener
 o setIncrement
public void setIncrement(int i) throws PropertyVetoException
Sets the value to increment/decrement the Spinner by.

Parameters:
int - i the increment/decrement value
Throws: PropertyVetoException
if the specified property value is unacceptable
See Also:
getIncrement
 o setMax
public void setMax(int i) throws PropertyVetoException
Sets the maximum value the spinner may have. Overridden here to set the size of the text area.

Parameters:
i - the new maximum value
Throws: PropertyVetoException
if the specified property value is unacceptable
Overrides:
setMax in class Spinner
See Also:
getMax, setMin
 o setMin
public void setMin(int i) throws PropertyVetoException
Sets the minimum value the spinner may have. Overriden here to set the size of the text area.

Parameters:
i - the new minimum value
Throws: PropertyVetoException
if the specified property value is unacceptable
Overrides:
setMin in class Spinner
See Also:
getMin, setMax
 o validateText
protected boolean validateText()
returns boolean if text in field is a valid entry

Returns:
true if text is valid
Overrides:
validateText in class Spinner

All Packages  Class Hierarchy  This Package  Previous  Next  Index